'use client'

import { useEffect, useState } from 'react';
import type { SummaryItemInfo } from '@/grpc/types';
import { Card, List } from 'antd';

export interface SummaryPanelProps {
    summaryItemList: SummaryItemInfo[];
}

export function SummaryPanel(props: SummaryPanelProps) {
    return (
        <Card title="工作总结" headStyle={{ backgroundColor: "#eee" }}>
            <List rowKey="summaryItemId" dataSource={props.summaryItemList} pagination={false} grid={{ gutter: 16 }}
                renderItem={item => (
                    <List.Item>
                        <Card title={item.createDisplayName} style={{ width: '200px', height: '200px', backgroundColor: item.tagInfo?.bgColor ?? "" }}
                        headStyle={{border: "none"}}>
                            {item.content ?? ""}
                        </Card>
                    </List.Item>
                )} />
        </Card>
    );
}